<div class="container">
    <div class="row">
        <div class="detsoal span12">
            <h1>Input Soal</h1>
            <fieldset>
                <legend>Keterangan Soal</legend>
                <h3>Soal: <?php echo $id_soal; ?> </h3>
                <h4>No. Soal: <?php echo $no_soal; ?></h4>
            </fieldset>
            <hr />
            <?php if(validation_errors() !== ''){?>
            <div class="alert alert-block alert-error">
              <button type="button" class="close" data-dismiss="alert">&times;</button>
              <h4  class='alert-heading'>Gagal!</h4>
              <?php echo validation_errors(); ?>
            </div>
            <?php } ?>
            <?php echo form_open_multipart('guru/detsoalsubmit'); ?>
                <fieldset>
                    <legend>Pertanyaan</legend>
                    <label for="pertanyaan"></label>
                    <textarea class="span5" rows="4" name="pertanyaan"></textarea>
                    <label for="pertanyaanpic">Gambar Pertanyaan</label>
                    <input type="file" name="pertanyaanpic"/>
                </fieldset>
                <hr />
                <fieldset>
                    <legend>Opsi 1</legend>
                    <label for="opsi1">Opsi 1 </label>
                    <input type="radio" name="kunci" value="1">
                    <textarea class="span5" rows="4" name="opsi1" id="opsi1"></textarea>
                    <label for="opsi1pic">Gambar Opsi 1</label>
                    <input type="file" name="opsi1pic"/>
                </fieldset>
                <hr />
                <?php for($i=2; $i<=$this->session->userdata('opsi'); $i++){?>
                <fieldset>
                    <legend>Opsi <?php echo $i; ?></legend>
                    <label for="opsi<?php echo $i; ?>">Opsi <?php echo $i; ?></label>
                    <input type="radio" name="kunci" value="<?php echo $i; ?>">
                    <textarea name="opsi<?php echo $i; ?>" id="opsi<?php echo $i; ?>" class="span5" rows="4"></textarea>
                    <label for="opsi<?php echo $i; ?>pic">Gambar Opsi <?php echo $i; ?></label>
                    <input type="file" name="opsi<?php echo $i; ?>pic"/>
                </fieldset>
                <hr />
                <?php } ?>
                
                <div class="form-actions">
                  <input type="submit" class="btn btn-primary" value="Submit Soal"/>
                  <button type="reset" class="btn btn-warning">Reset Soal</button>
                </div>
            <?php echo form_close(); ?>
        </div>
    </div>
</div>